package com.lagou.service.impl;

import com.lagou.EmailService;
import com.lagou.util.EmailTool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@org.apache.dubbo.config.annotation.Service
public class EmailServiceImpl implements EmailService {

    @Autowired
    private EmailTool emailTool;

    @Override
    public boolean sendEmail(String email, String code) {
        return emailTool.sendEamil(email, "lagou springcloud", String.format("验证码为: %s", code));
    }
}
